import java.io.IOException;

//这里练习异常处理
public class exception {
    public static void main(String[] args) {
        try{
            process1();
        }catch (Exception e){
//            e.printStackTrace();
            System.out.println(e.getCause());
        }
    }

    static void process1() {
        try {
            process2();
        } catch (NullPointerException e) {
            throw new IllegalArgumentException(e);
        }catch (Exception e){
//            e.printStackTrace();
        }
    }

    static void process2() {
        throw new NullPointerException();
    }
}
